Skip to content

Remove lodash.get#105

Open
ericcornelissen wants to merge 1 commit intojeemok:masterfrom
ericcornelissen:patch-1
Open

Remove lodash.get#105
ericcornelissen wants to merge 1 commit intojeemok:masterfrom
ericcornelissen:patch-1

Conversation

@ericcornelissen
Copy link
Contributor

This refactors the code base to get rid of lodash.get, which has been deprecated in favor of the ?. operator. Since this project promises support with node >= 8.12 and ?. is in Node.js since v14 I do not use it in these changes. Rather, I use old school JavaScript to achieve the same effect as these two alternatives. In most cases where lodash.get was being used it was pretty much useless and thus would not even require ?., instead maybe providing an alternative for a default value. In some other cases its use side-stepped the type checker and the refactored code adds the appropriate type checks.

This refactors the code base to get rid of lodash.get, which has been
deprecated in favor of the `?.` operator. Since this project promises
support with node >= 8.12 (see package.json:16) and `?.` is in Node.js
since v14 I do not use it in these changes. Rather, I use old school
JavaScript to achieve the same effect as these two alternatives. In most
cases where `lodash.get` was being used it was pretty much useless and
thus would not even require `?.`. In some cases it side-stepped the type
checker and the refactored code adds the appropriate type checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant